using System;
using System.Collections.Generic;
using Dict.DataModel;

namespace Dict.Dao
{
    public class TableExpeditionMissionDao:DaoBase<TableExpeditionMission>
    {
        public override void AddPrimaryIndex(TableExpeditionMission model)
        {
            cachePrimary[model.missionId.ToString()] = model;
        }

        public override string GetFileName()
        {
            return "TableExpeditionMission.txt";
        }

        protected override TableExpeditionMission ParseRowData(string[] rowData)
        {
            TableExpeditionMission data = new TableExpeditionMission();
			data.missionId = rowData [0];
			data.missionType = rowData [1];
			data.level = rowData [2];

            if (string.IsNullOrEmpty(rowData[3]))
            {
                data.time = 0;
            }
            else
            {
                data.time = int.Parse(rowData[3]);
            }
			data.name = rowData [4];
			data.desc = rowData [5];

            return data;
        }



    }

}
